﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace H02
{
    class Program
    {
        static void Main(string[] args)
        {
            int i;
            long[] arr = new long[100];
            arr[0] = 1;
            arr[1] = 1;
            for (i = 2; i < 100; i++)
            {
                arr[i] = arr[i - 1] + arr[i - 2];
            }
            Console.WriteLine("请输入需要求的第n项：");
            int n ;
            int.TryParse(Console.ReadLine(), out n);//输入n
            if(n>=1&&n<=100)
                Console.WriteLine("结果为：{0}",arr[n-1]);
            else Console.WriteLine("输入错误");
            Console.ReadKey();
        }
    }
}
